export const scanCode = (scanType = ['barCode', 'qrCode', 'datamatrix', 'pdf417']) => {
	return new Promise((resolve, reject) => {
		uni.scanCode({
			scanType,
			success: function(res) {
				resolve(res)
			},
			fail: function(err) {
				uni.showToast({
					title: '扫码有误，请重新扫码',
					icon: 'none',
					duration: 6000
				});
				reject
			}
		});
	})
}